package com.adley.client;

import org.springframework.boot.WebApplicationType;
import org.springframework.boot.SpringApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.scheduling.annotation.EnableAsync;
import org.springframework.context.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringBootApplicationBuilder;

@SpringBootApplication
@EnableAsync
public class Application {
    public static void main(String[] args) {
        new SpringBootApplicationBuilder(Application.class).web(WebApplicationType.SERVLET).run(args);
    }

    @Bean
    public Executor threadPoolTaskExecutor() {return new ThreadPoolTaskExecutor();}
}